package com.ebox.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ebox.entity.User;
import com.ebox.service.UserService;

@Controller
@RequestMapping("/admin")
public class IndexController {
	
	@Autowired
	private UserService userService;
	
	
	@RequestMapping("/init")
	public String initLogin() {
		  User user = new User();
		  user.setId(System.currentTimeMillis()+"");
		  user.setUserName(System.currentTimeMillis()+"");
		  user.setPassword("dsddsd");
		  userService.saveEntity(user);
		
		return "login";
	}

}
